import { AntdModalProps } from "@/hooks/useAntdModal"
import useQuery from "@/hooks/useQuery"
import { publishPlanLinkApp, saveReleasePlan } from "@/service/deliver"
import { DatePicker, Form, Input, Modal } from "antd"

const CreateAppVersion = ({ form,payload, closeModal, refresh, modalProps }: AntdModalProps) => {
   const query =  useQuery()
  const onOk = async () => {
    let data = await form.validateFields()
   
    await publishPlanLinkApp({...query,appId:payload.id, ...data})
    refresh()
    closeModal()
  }
  return <Modal  {...modalProps} onOk={onOk}>
    <Form labelCol={{ span: 6 }} form={form}>
    

      <Form.Item label='项目版本' name='deployVersion' rules={[{
        required: true,
        message: '项目版本'
      }]}>
        <Input />
      </Form.Item>
      
    </Form>
  </Modal>
}
export default CreateAppVersion
